﻿@{
	var imgAvatar = Url.Action("ShowMicroAvatar", "Perfil", new { rand = new Random() { }.Next() });
}
<!DOCTYPE html>
<html class="no-js">
<head>
	<meta charset="utf-8" />
	<title>@ViewBag.Title</title>
	<link href="@Url.Content("~/Content/themes/mytheme/jquery-ui.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/SiteRestrito.css")" rel="stylesheet" type="text/css" />
	@*<link href="@Url.Content("~/Content/SiteRestrito-min.css")" rel="stylesheet" type="text/css" />*@
	<link href="@Url.Content("~/Content/fancybox/fancybox-1.3.4.css")" rel="stylesheet" type="text/css" />
	<script src="@Url.Content("~/Scripts/jquery-1.6.4.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/script.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.maskedinput-1.3.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.easing-1.3.pack.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.fancybox-1.3.4-min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/numbers.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
	@if (false)
 {
		<script src="../../Scripts/jquery-1.6.4-vsdoc.js" type="text/javascript"></script>       
		<script src="../../Scripts/script.js" type="text/javascript"></script> 
 }
</head>
<body>
	<div id="load" style="background-color: black; color: white; display: none;">
		<img src="@Url.Content("~/Content/Imagens/loader.gif")" alt="Aguarde, carregando..." class="imageLoading" />
		<br />
		Aguarde, carregando...
	</div>
	<script type="text/javascript">
		$('#load').show();
	</script>
	<div class="page">
		<header>
			<div id="header">
				<div id="title">
				</div>
				<div id="logindisplay">
					<a id="perfil" class="perfil" href="#">
						<div id="pool-down" class="perfil">
							<img src="@imgAvatar" id="micro-avatar" alt="Perfil" class="perfil" >
							@Session["nomeUsuario"]
						</div>
					</a>
					<div id="config-perfil">
						<ul id="config">
							<li data-url="@Url.Action("Index", "Perfil")">Perfil</li>
							<li data-url="@Url.Action("Index", "GrupoDespesa")">Grupo de Despesas</li>
							@if (User.IsInRole("Administrador"))
	   {
								<li id="membership" data-url="@Url.Action("Admin", "Cadastro")">Membership</li>
	   }
							<li id="membership" data-url="@Url.Action("Sair", "Cadastro")">Sair</li>
						</ul>
					</div>
				</div>
				<nav>
					<ul id="menu">
						<li class="selected inicio"><a href="@Url.Action("Index", "Home")">Início</a></li>
						<li><a href="@Url.Action("Index", "Conta")">Contas</a></li>
						<li style="display: none"><a href="@Url.Action("Index", "Projeto")">Projetos</a></li>
						<li><a href="@Url.Action("Index", "Tarefa")">Tarefas</a></li>
						<li style="display: none"><a href="@Url.Action("Index", "Agenda")">Agendas</a></li>
						<li style="display: none"><a href="@Url.Action("Index", "Compromisso")">Compromissos</a></li>
						<li style="display: none"><a href="@Url.Action("Index", "DashBoard")">DashBoard</a></li>
					</ul>
				</nav>
			</div>
		</header>
		<section id="main">
			@RenderBody()
		</section>
		<footer>
        &#169; 2011 - Personal Micro Finance
        </footer>
	</div>
	<script type="text/javascript">
		$('#perfil').click(function (e) {
			e.preventDefault();
			$('#config-perfil').toggle();			
			$('#logindisplay').addClass('selected');
		});
		$('ul#config li').click(function (e) {
			e.preventDefault();
			showLoading();
			var url = $(this).data('url');
			window.location.href = url;
		});
		$('html').live('click', function (e) {
			if (e.target.className !== "perfil") {
				$("#config-perfil").hide();
			}
		});			
	</script>
</body>
</html>
